<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="./images/combined.css" charset="GB2312">
    <script type="text/javascript" src="./images/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="./images/JScript.js"></script>
    <title>支付宝付款</title>
    <script>
        $(document).ready(function () {
            var currentProCode = $("#currentProCode").val();
            var currentTab = $("#tab_" + currentProCode);
            currentTab.addClass("current");
            currentTab.siblings().removeClass("current");
            //var num = $(".select-tab li").index(currentTab);
            var num = currentTab.index();
            $(".contentwrap .paypanel").eq(num).show().siblings().hide();
        })
    </script>
</head>
<body>
<?php
$optEmail = isset($_REQUEST["optEmail"]) ? $_REQUEST["optEmail"] : "";
$payAmount = isset($_REQUEST["payAmount"]) ? $_REQUEST["payAmount"] : "";
$title = isset($_REQUEST["title"]) ? $_REQUEST["title"] : "";
$nickName = isset($_REQUEST["nickName"]) ? $_REQUEST["nickName"] : "";
$memo = isset($_REQUEST["memo"]) ? $_REQUEST["memo"] : "";
$act = isset($_REQUEST["act"]) ? $_REQUEST["act"] : "";
if ($act == "pay") {
    ?>
    <iframe id='Jframe' height='1' width='1' frameborder=0></iframe>
    <script type='text/javascript'>
        window.onload = function () {
            var jf = document.getElementById('Jframe').contentWindow;
            jf.document.body.innerHTML = "<form target='_top' method='post' action='https://shenghuo.alipay.com/send/payment/taobaoSellerFill.htm?nickName=<?php echo $nickName;?>&payAmount=<?php echo $payAmount;?>&title=<?php echo $title;?>&memo=<?php echo $memo;?>'></form>";
            jf.document.forms[0].submit()
        }</script>
    <?php
    exit();
}
?>
<div class="headwrap">
    <div class="head clearfix">
        <ul>
            <li class="head_logo"><a href="/" target="_blank">网站首页</a></li>
            <li class="head_link"><a href="/" target="_blank">网站首页</a></li>
        </ul>
    </div>
</div>
<!--header结束-->


<div class="content">

    <div class="order">
        <div class="order_content detail">
            <ul class="clearfix">
                <li><span>付款金额：</span><strong>￥<?php echo $payAmount; ?></strong></li>
                <li><span>收款人：</span><strong><?php echo $optEmail; ?></strong></li>
                <li><span>付款说明：</span><strong><?php echo $title; ?></strong> &nbsp;</li>
            </ul>

            <div class="findetail">
                <a href="#">转账信息</a>
            </div>
        </div>
    </div>

    <input type="hidden" id="currentProCode" value="SP000001">

    <div class="select-tab">
        <ul>
            <li id="tab_SP000001" class="current"><a href="#">手机支付宝支付</a></li>
            <?php
            if ($nickName != "") {
                ?>
                <li id="tab_SP000003" class=""><a href="#">网页支付宝支付</a></li>
            <?php } ?>
            <li id="tab_SP000002" class=""><a href="#">网页支付宝转账</a></li>
        </ul>
    </div>

    <div class="contentwrap">

        <div class="paypanel" style="display: block;">
            <div class="content_left">

                <h4><span>充值流程：确认充值账号后,打开手机支付宝扫描二维码向本站支付宝转账.</span></h4>

                <ul class="clearfix hided">
                    <li><span>1.首先打开手机支付宝钱包.</span></li>
                    <li><span>2.扫描本站支付宝二维码,并<strong>选择转账功能</strong></span></li>
                    <li><span>3.付款金额填写:<strong><?php echo $payAmount; ?></strong></span></li>
                    <li><span>4.付款说明填写:<strong><?php echo $title; ?></strong></span></li>
                    <li><span>温馨提示：请勿修改付款金额付款说明<strong>否则不返数据</strong></span></li>
                    <li><span>到账时间：付款成功后,<strong>耐心等待10秒钟</strong>.</span></li>
                    <li><span><strong>注意事项：</strong>.</span></li>
                    <li><span><strong>1.请正确填写付款说明,否则无法自动到账.</strong>.</span></li>
                    <li><span><strong>2.本站支付宝账户会不定期更换,每次充值前请务必核对支付宝账号.</strong>.</span></li>
                </ul>

            </div>
            <div class="content_right_m">
                <img src="./images/QR.jpg"
                     style="margin-top:20px; padding-top:20px;margin-left:20px; padding-left:20px">
            </div>
        </div>


        <?php
        if ($nickName != "") {
            ?>
            <div class="paypanel" style="display: none;">
                <div class="content_left">
                    <h4><span>充值流程：登录支付宝后点击立即支付进行在线支付.</span></h4>

                    <ul class="clearfix">
                        <li><span>1.点击“登录支付宝”打开支付宝网站并登录您的支付宝.</span></li>
                        <li><span>2.登录后返回本页面，点击“立即支付”进行支付</li>
                        <li><span>温馨提示：请勿修改付款金额付款说明<strong>否则不返数据</strong></span></li>
                        <li><span>到账时间：付款成功后,<strong>耐心等待10秒钟</strong>.</span></li>
                        <li><span><strong>注意事项：</strong>.</span></li>
                        <li><span><strong>1.请正确填写付款说明,否则金币无法到账,每个付款说明只能使用一次.</strong>.</span></li>
                        <li><span><strong>2.本站支付宝账户会不定期更换,每次充值前请务必核对支付宝账号.</strong></span></li>
                    </ul>
                    <div class="btn"><a target="_blank" href="https://auth.alipay.com/login/index.htm" id="sino_Href">登录支付宝</a>
                    </div>
                    <div class="btn"><a onClick="javascript:document.myform.submit();return false;" href="#"
                                        id="sino_Href">立即支付</a></div>
                    <form name="myform" action='index.php' method='POST' target="_blank">
                        <input type="hidden" name="act" value="pay"/>
                        <input type="hidden" name="nickName" value="<?php echo $nickName; ?>"/>
                        <input type="hidden" name="payAmount" value="<?php echo $payAmount; ?>"/>
                        <input type="hidden" name="title" value="<?php echo $title; ?>"/>
                        <input type="hidden" name="memo" value="%c7%eb%ce%f0%d0%de%b8%c4%b8%b6%bf%ee%cb%b5%c3%f7"/>
                    </form>

                </div>
                <div class="content_right_pc">
                </div>
            </div>
        <?php } ?>


        <div class="paypanel" style="display: none;">
            <div class="content_left">
                <h4><span>充值流程：确认充值账号后,登录网页支付宝向我们的支付宝转账.</span></h4>

                <ul class="clearfix">
                    <li><span>1.首先请登录网页支付宝.</span></li>
                    <li><span>2.向本站支付宝账号:<strong><?php echo $optEmail; ?></strong> 转账
                             <strong>￥<?php echo $payAmount; ?></strong> 元.</span></li>
                    <li><span>3.付款说明请填写:<strong><?php echo $title; ?></strong></span></li>
                    <li><span>温馨提示：请勿修改付款金额付款说明<strong>否则不返数据</strong></span></li>
                    <li><span>到账时间：付款成功后,<strong>耐心等待10秒钟</strong>.</span></li>
                    <li><span><strong>注意事项：</strong>.</span></li>
                    <li><span><strong>1.请正确填写付款说明,否则无法自动到账.</strong>.</span></li>
                    <li><span><strong>2.本站支付宝账户会不定期更换,每次充值前请务必核对支付宝账号.</strong></span></li>
                </ul>
                <div class="btn"><a target="_blank"
                                    href="https://auth.alipay.com/login/index.htm?goto=https://shenghuo.alipay.com/send/payment/fill.htm?title=<?php echo $title; ?>"
                                    id="sino_Href">登录支付宝付款</a></div>


            </div>
            <div class="content_right_pc">
                <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="410" height="410" id="alipay"
                        align="middle">
                    <param name="movie" value="./images/alipay.swf">
                    <param name="quality" value="high">
                    <param name="bgcolor" value="#ffffff">
                    <param name="play" value="true">
                    <param name="loop" value="true">
                    <param name="wmode" value="window">
                    <param name="scale" value="showall">
                    <param name="menu" value="true">
                    <param name="devicefont" value="false">
                    <param name="salign" value="">
                    <param name="allowScriptAccess" value="sameDomain">
                    <!--<![endif]-->
                </object>
                <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="./images/alipay.swf" width="410" height="410">
                    <param name="movie" value="css/img/alipay.swf">
                    <param name="quality" value="high">
                    <param name="bgcolor" value="#ffffff">
                    <param name="play" value="true">
                    <param name="loop" value="true">
                    <param name="wmode" value="window">
                    <param name="scale" value="showall">
                    <param name="menu" value="true">
                    <param name="devicefont" value="false">
                    <param name="salign" value="">
                    <param name="allowScriptAccess" value="sameDomain">
                    <!--<![endif]-->
                    <a href="http://www.adobe.com/go/getflash">
                        <img src="./images/get_flash_player.gif" alt="获得 Adobe Flash Player">
                    </a>
                    <!--[if !IE]>-->
                </object>
            </div>
        </div>

    </div>
</div>


<div id="footer">
    <div class="foot-link">
        <a>关于我们</a>
        | <a>新闻中心</a>
        | <a>合作伙伴</a>
        | <a>客服中心</a>
        | <a>用户体验</a>
        | <a>联系我们</a>
    </div>
    <div class="copyright">Copyright 2000 - 2015 交友中心. All Rights Reserved</div>
</div>
<script type="text/javascript">
    var id = "<?=$title?>";
    $(function () {
       var isPay = setInterval(function () {
            $.ajax({
                type: "post",
                url: "/index.php?m=pay&c=respond&a=isPay",
                data: "act=isPay&id=" + id,
                success: function (msg) {
                    if (msg == 'success') {
                        clearInterval(isPay);
                        confirm()
                        window.location="/index.php";
                    }
                }
            })
        },2000);
    });
</script>

</body>
</html>